package fishinpool;
/**
 *
 * @author Admin
 */
public class Hindrance {
    private int[][] coordinates;
    private int amountOFHindrance;
    public Hindrance(int amountOFHindrance){
        this.amountOFHindrance = amountOFHindrance;
        coordinates = new int[2][amountOFHindrance];
        for(int i = 0; i < amountOFHindrance; i++){
            coordinates[0][i] = Input.inputNumber("input x:");
            coordinates[1][i] = Input.inputNumber("input y:");
        }
    }
    public boolean checkHindrance(Position position){
        for (int i = 0; i < amountOFHindrance; i++){
            if ( position.getWidth() == coordinates[0][i] && position.getLength() == coordinates[1][i]){
                return true;
            }
        }return false;
    }
}
